package com.demo.project_template.controller;

import com.demo.project_template.entity.PostLike;
import com.demo.project_template.service.PostLikeService;
import com.demo.project_template.vo.response.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 帖子点赞 前端控制器
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-08-20 11:48:57
 */
@Api(tags = "动态（帖子）点赞")
@RestController
@RequestMapping("/postLike")
public class PostLikeController {
    @Resource
    private PostLikeService postLikeService;


    @ApiOperation(value = "点赞")
    @PostMapping(value = "/add")
    public R<?> add(@RequestBody PostLike postLike){
        postLikeService.add(postLike);
        return R.success();
    }
}
